<template>
	<div class="data-empty" :class="{ small: size === 'small' }">
		<img src="@/assets/images/empty.svg" alt="notData" />
		<div class="name">{{ emptyName }}</div>
	</div>
</template>

<script setup lang="ts">
interface Empty {
	emptyName?: string;
	size?: string;
}

// 默认值
withDefaults(defineProps<Empty>(), {
	emptyName: '暂无内容',
	size: 'default'
});
</script>

<style scoped lang="scss">
.data-empty {
	font-size: 14px;
	line-height: 22px;
	text-align: center;
	.name {
		color: #606266;
	}
	&.small {
		line-height: 12px;
		img {
			width: 100px;
			height: 100px;
		}
	}
}
</style>
